import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/api/login',
    method: 'post',
    data
  })
}

export function register(data) {
  return request({
    url: '/api/register',
    method: 'post',
    data
  })
}

export function getUserInfo() {
  return request({
    url: '/api/getInfo',
    method: 'get'
  })
}

export function updateUserInfo(data) {
  return request({
    url: '/api/user/info',
    method: 'put',
    data
  })
}
export function getCaptchaImage() {
  return request({
    url: '/api/captchaImage',
    method: 'get',
  })
}
